﻿using Microsoft.AspNet.Identity;
using Microsoft.Owin.Security;
using StructureMap.Configuration.DSL;
using System.Web;
using ZSoft.Telegram.DataAccess.Config.User;
using ZSoft.Telegram.Domain.User;

namespace ZSoft.Telegram.UI.Web.Infrastructure.IOC.Registries
{
    public class IdentityRegistry:Registry
    {
        public IdentityRegistry()
        {
            this.For<IUserStore<ApplicationUser, int>>().Use<CustomUserStore>();
            this.For<IAuthenticationManager>().Use(() => HttpContext.Current.GetOwinContext().Authentication);
        }
    }
}
